﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MobileSales.Website.Infrastructure;
using System.Web.Security;
using MobileSales.Website.Properties;

namespace MobileSales.Website.Controllers
{
    public class HomeController : ControllerBase
    {
        #region Index
        public ActionResult Index()
        {
            if (Settings.Default.DebugMode)
            {
                ViewData["cook"] = String.Format("Token: {0}, EmployeeId: {1}", this.Token, this.EmployeeId);
                return View();
            }
            else
            {
                if (Request.IsAuthenticated)
                {
                    return View();
                }
                else
                {
                    return RedirectToAction("LogOn", "Account");
                }
            }
        } 
        #endregion

    }
}
